package com.cn.bulu.TEST;

import java.util.Map;

import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.cn.bulu.dao.MerchantsDao;
import com.cn.bulu.utils.jiguang.Jiguang;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath*:/spring-mybatis.xml" })
@Transactional
public class TestJiGuangJupsh {
	
	private Logger logger = Logger.getLogger(TestJiGuangJupsh.class);
	
	@Autowired
	private MerchantsDao merchantsDao;
	
	
	public MerchantsDao getMerchantsDao() {
		return merchantsDao;
	}


	public void setMerchantsDao(MerchantsDao merchantsDao) {
		this.merchantsDao = merchantsDao;
	}


	@Test
	public void testJiGuangJupsh(){
		// 根据订单号查询订单信息
		Map<String, Object> indentMap = merchantsDao.selectIndent(85);
		Integer roomNumB = (Integer)indentMap.get("roomNumB");
		indentMap.put("roomNumB", roomNumB == null ? 0 : roomNumB);
		logger.error("========================================"+indentMap.toString());
		Jiguang.JpushIndent(indentMap);// 通过极光推送订单
		
	}
	
	@Test
	public void testCurtainPrice(){
		
	}
}
